Image compression method

ABSTRACT

The invention relates to a method in image processing, wherein an image in digital form is in coding phase compressed, quantized by a quantization matrix (QL, QC) and coded by a coding matrix (HL 1,  HK 1,  HL 2 ), wherein one or more data frames are formed. In a decoding phase decoding, dequantization and decompression is carried out to the information comprised in the data frame. One or more matrices (QL, QC, HL 1,  HK 1,  HL 2 ) used in the coding phase are left out of the data frame, wherein the corresponding matrix is stored into coding device ( 8 ) performing the decoding phase.

[0001] The present invention relates to a method in image processing as defined in the preamble of appended claim 1. The invention further relates to a device as defined in the appended claim 5.

[0002] In recent years, digital technology has developed intensely, so various methods have been developed to transmit and record various images in digital form. Advantages of digital technology include better reproduced, disturbance-free and enduring images; also deterioration of quality can be avoided in copying. In a digital recording device, also data of the contents of the recorded image can be included, which facilitates the retrieval of the desired image. However, the implementation of digital technology in image recording and transmission has been decelerated e.g. by the large quantity of data required by the digital presentation form.

[0003] The quantity of image information increases in relation to the resolution of image accuracy, i.e. as the accuracy is reduplicated the quantity of information is typically quadruplicated. The image information is composed of pixels, each of which is showing one detail of the image. This image information is formed e.g. of the luminance data of the pixel and in color images also of the color data of the pixel, as explained later in this specification.

[0004] The resolution of the image can be e.g. 256×256, i.e., the image is advantageously divided into 256 horizontal portions and 256 vertical portions. In case of a black and white image with 256 grey tone values the image information of each pixel can be illustrated as eight binary digits, i.e., by one byte. Thus, the quantity of image information without compression is 524 288 bits (=256×256×8 bits), i.e., 65 536 bytes.

[0005] An image according to VGA standard (Video Graphics Array) which is known as such e.g. in connection with computers, is composed of 640 horizontal pixels and 480 vertical pixels, e.g. the image resolution is 640×480. In an image in accordance with a more recent, XGA standard (eXtended Graphics Array), the resolution can even exceed 1,000×1,000 pixels, wherein one digitized, uncompressed image comprises over a million bytes.

[0006] In many embodiments it is, however, not necessary to show such large pictures. E.g. a telephone book embodiment, where e.g. a graphic display of a mobile station can, in addition to the telephone number, display the picture of the person concerned, can be implemented by a relatively rough resolution and still the person is recognizable on the basis of the picture.

[0007] Numerous different methods have been developed for compressing image information in electric form (digitized). One known compression method is disclosed in the ISO standard DIS 10918-1 of the International Organisation for Standardization, i.e., in so-called JPEG standard (Joint Photographic Experts Group). The JPEG standard is designed for compression of color and grey tone images taken of naturalistic image objects. Compression according to the JPEG standard is most efficient in compression of photographs, naturalistic paintings, computer formed pictures which aim to look naturalistic, as well as other corresponding images.

[0008] Compression according to the JPEG standard is not necessarily loss-free, i.e., the compressed image can for some parts be different than the original image. These changes are usually such small changes which cannot be detected by the human eye. By using compression in accordance with JPEG standard, it is possible to obtain compression ratio of the value 10:1 to 20:1 without observable losses, i.e., the size of the compressed image is less than 10% of the original image size. If some minor, visually observable changes are tolerated in the image, even a compression ratio of 50:1 can be obtained.

[0009] The JPEG standard is illustrated in more detail e.g. in Reference 1: “JPEG Still Image Data Compression Standard” and in Reference 2: “Digital Compression and Coding of Continuous-tone Still Images—Part 1”. A more detailed list of reference literature is found in the end of the present specification.

[0010] In order to apply the compression method in accordance with the JPEG standard, the image, or any other data signal treated in accordance with the method, has to be in digital form. A generally used color image signal is composed of luminance and chrominance data. When the image is converted into digital form, both the luminance and the chrominance data is converted separately, usually in an accuracy of 8 bits.

[0011] Color images can be formed e.g. in a manner that the information of each pixel is composed of luminance and chrominance information. Thus, the quantity of information increases to triple, in case the chrominance information is illustrated by a bit quantity corresponding to that of the luminance information. Due to the properties of the human eye, the chrominance information can, however, be illustrated by using a smaller accuracy than the luminance information, in a manner that the eye does not detect any deterioration in image quality. Typically, both components of the chrominance information are formed from a square comprising four pixels. Color images can also be illustrated by a so-called RGB image in which each pixel is illustrated by using three primary colors, i.e., red (R), green (G) and blue (B). Thus, the quantity of information is in one image triple compared to a grey tone image. In a color image the intensity of each color is usually divided into 256 portions in a RGB image, i.e., 24 bits (3 bytes) are required for showing one pixel.

[0012] Usually also RGB images are converted into luminance/chrominance form before the image is compressed. For this purpose, a widely used conversion formula has been developed, which is known as abbreviation CCIR60 and marked as YCbCr. This is a kind of three dimensional presentation form, in which the various components can be calculated from the R, G and B information in the following manner:

Y=0.299R+0.587G+0.1 14B  (1a)

Cb=−0.168R−0.3313G+0.5B  (1b)

Cr=0.5R−0.4187G−0.0813B  (1c)

[0013] The luminance component Y illustrates the grey tones of the image and it can be used when showing a black and white image and when showing a color image in black and white. There are two chrominance components: Cb and Cr, which include the color information of the image. However, a color image can also be compressed in RGB form, but in this case the same compression efficiency that is obtained when compressing an image in luminance/chrominance form cannot usually be obtained.

[0014] In various image compression techniques, a discrete cosine transform (DCT) is performed to an image signal that has been converted to digital form, before the image signal is transmitted to a data transfer medium or recorded into recording media. By the DCT conversion it is possible to calculate the frequency spectrum of the periodic signal, i.e., to shift from time domain to frequency domain. The word discrete denotes in this context to the fact that in the conversion separate pixels are treated instead of continuous variables. In the image signal, the successive pixels have typically a large mutual correlation. One property of the DCT conversion is that the facients generated as a result of the DCT conversion are practically taken uncorrelated, so that the DCT conversion performs efficiently the conversion of the image signal from time domain to frequency domain.

[0015] When a discrete cosine transform is used in compression of a single image, two-dimensional conversion is required. Instead of time, the variables are the latitude and altitude co-ordinates X and Y. Further, the frequency is not the quantity of sequences in a second, as normally, but it illustrates e.g. the conversion rate of the luminance in the direction of location co-ordinates X,Y. This is called spatial frequency.

[0016] An image comprising a large amount of micronic details shows large spatial frequencies. E.g. the parallel lines in the image correspond to the larger frequency the more densely they are located. Diagonal directed frequencies that are larger than a certain limit value can be quantized more in image processing without observably deteriorating the image quality.

[0017] In the JPEG compression, the DCT conversion is carried out in blocks in a manner that the block size is 8×8 pixels. The luminance level that is converted has the full resolution. Both chrominance signals are subsampled, e.g. an area of 16×16 pixels is subsampled to an area of 8×8 pixels. The differences in block sizes are by and large due to the fact that the eye does not detect changes in chrominance as easily as it detects changes in luminance, wherein an area of 2×2 pixels is coded with the same chrominance value. However, the invention is not restricted merely to the JPEG compression and said block sizes, but it can be adapted also in other corresponding compression methods and in blocks of various sizes.

[0018] For example when converting luminance values to the DCT level, the luminance values and horizontal and vertical spatial frequencies calculated thereof are brought from the pixel block that is converted. Each frequency component is calculated of all the values of the block that is converted. Thus, the elements of the coefficient matrix that are obtained by discrete cosine transform do not correspond to single pixels of the block that is converted. In the coefficient matrix, the horizontal frequency components illustrate the horizontal changes in the block that is converted, and in a corresponding manner, the vertical frequency components illustrate the vertical changes in the block that is converted. The first element in the first row in the upper left corner of the matrix illustrates the zero frequency value of the image block that is converted, because it is comparable to the average of the pixels of the block that is converted.

[0019] Subsequent to the calculation of the coefficient matrix, i.e., after the DCT conversion, a quantization is performed to an element F(i,j) of a coefficient matrix F, i.e., the elements are divided into quantization levels of an appropriate size in a manner that the visual system of the human eye is taken into account. FIG. 1a shows an example of a luminance-signal quantization matrix QL used generally in image quantization, and FIG. 1b shows an example of a chrominance-signal quantization matrix QC used generally in image quantization. Quantization is performed advantageously in accordance with Table (2a). In image dequantization, e.g. when receiving a compressed image from data transfer medium, in the inverse transformation (iDCT) that is performed, a similar quantization matrix QL, QC are used in accordance with Table (2b). Based on the quantization matrices QL, QC and formulas (2a) and (2b), it can be detected that in connection with larger frequencies and in diagonal direction fewer quantization levels are used than in connection with frequencies close to zero. This is especially due to the fact that larger diagonal frequencies are less important to the human visual system than frequencies close to zero frequency and substantially horizontal and vertical frequencies. ${\left( \text{2a} \right)\quad {{QF}\left( {i,j} \right)}\_} = \frac{F\left( {i,j} \right)}{Q\left( {i,j} \right)}$

 Rec(i,j)=Q(i,j)×QF(i,j)  (2b)

[0020] Subsequently, for a quantized, DCT converted matrix, a coding is performed, wherein at first the elements of each matrix are arranged sequentially, preferably in a manner that the first element is an matrix element (0,0). Next, the second element (0,1) in the first horizontal line of the matrix is selected. The next step is to move in diagonal direction down and to the left to the first element (1,0) of the second horizontal line. From here it is moved one line down to the first element (2,0) of the third horizontal line, and thereafter back in the diagonal direction, up and right to the first horizontal line, i.e., in the order (0,0), (0,2). Finally, the last element in the last horizontal line is placed, which in connection with the most usually used 8×8 block size is the eighth element of the eighth horizontal line (7, 7). The aim of this arrangement is to take into account e.g. the fact that the images usually contain more information in smaller frequencies than in larger frequencies, wherein particularly the coefficients illustrating larger frequencies are zero in connection with many images. Thus, several sequential zero values are obtained which can be replaced by information showing the quantity of successive zero values. FIG. 1g further illustrates by means of a line drawn in the matrix the sequential arrangement of the matrix elements.

[0021] In order to code the quantized, DCT converted image, the JPEG standard illustrates two coding systems: Huffman coding and arithmetic coding. These methods transform the data that is converted into codes of varying length in a manner, that for often repeating symbols is formed a shorter code word than for less frequently repeating symbols. In addition, in Huffman coding, no code word appears in the initial part of another code word. When e.g. the code word that corresponds to a bit string (symbol) ‘0010 0001’ is ‘10’, then no other code word begins with the bits ‘10’.

[0022]FIG. 1c illustrates a Huffman Table H, which has proved to be efficient in image compression. Table of FIG. 1c is regarded for coding the DC difference value of a luminance signal. The compression efficiency of this table has been compared to optimal compression, performed by a table calculated from the image information by Huffman coding (Reference 3, a list of references is in the end of the specification). In the comparison, different images were used, a Huffman table being calculated for each image. The size of the compressed image was typically only less than 5 percent larger when using the table of FIG. 1c than when using the optimal table calculated from the image information. On the other hand, to calculate a compression table for each image separately increases the capacity required for the compression device, wherein in a large part of JPEG coded images a Huffman coding table of FIG. 1c have been used. The operation of Huffman coding is illustrated later in this specification when an apparatus according to the advantageous embodiment of invention is discussed.

[0023] Advantageously after the coding, a data frame is formed wherein e.g. the coded image information is located. FIG. 3a illustrates in reduced form a data frame 300 in accordance with the JPEG standard. The data frame 300 comprises header data 301 and data field 302, wherein the actual image information is located. The header data 301 contain e.g. the following fields: a start of image (SOI) 303 of the frame, a JPEG file interchange format header (JFIF) 304, one or more Huffman coding tables 305, and a quantization table 306, a start of frame (SOFO) 307, and a start of scan (SOS) 308 of the image. Next in the data frame is the image information, which is compressed advantageously by using DCT conversion and coded by Huffman coding. Subsequent to the image information there is still an end of image (EOI) field 309, which informs of the end of the data frame. It is known as such that also enciphering can be carried out to the data frame, if necessary, by using an encryption algorithm or an encryption key.

[0024]FIG. 3a illustrates also the length of each field as bytes. The length of the header data is in this example 424 bytes. The length of the image information depends e.g. on the resolution of the image and the coding and compression level used in the compression of the image. In connection with portable electric devices, such as mobile stations, the images are usually rather small, wherein the length of the header data forms a relatively large proportion of the entire data frame.

[0025] The need to process images will increase also in different portable devices, such as mobile stations. The drawback is then that images compressed in the present form in accordance with prior art require a large quantity of storage capacity. This restricts the quantity of images that are storable into a portable device at a time and, on the other hand, also the image transmission lasts relatively long.

[0026] At the time when the compressed image is wished to be converted into uncompressed form, e.g. for viewing, the image is Huffman decoded, dequantized and an inverse DCT conversion (iDCT) is carried out. To perform the decoding, it is necessary to know the contents of the coding table and, in a corresponding manner, to perform decompression, one has to know the contents of the table used in compression. In image compression systems of prior art these tables which are read in the header field in the inverse conversion of the image are added in the header of the data frame. However, this involves the drawback that the size of the tables can be tens, even hundreds of bytes, wherein the proportion of the tables of the header field can be even larger than the quantity of the actual image information.

[0027] An object of the present invention is to bring about a method and a system for image compression. The invention is based on the idea that the header of the image information frame is decreased in a manner that no compression and coding tables are stored therein. These tables are stored advantageously in decoders. The method of the present invention is characterized in what is presented in the characterizing part of the accompanying claim 1. The device of the present invention is characterized in what is presented in the characterizing part of the accompanying claim 5.

[0028] The invention provides considerable advantages over prior art methods, systems and devices. Compression carried out in accordance with the invention reduces the quantity of the information transmitted in image storage and transfer, wherein in the same storage space more images or images of an improved quality can be stored than is possible in prior art. Also, the transfer of images is faster because there is less information to be transferred per one image than when transferring images compressed according to prior art.

[0029] In the following, the invention is described in more detail with reference made to the enclosed drawings, where

[0030]FIG. 1a shows an advantageous quantization matrix of luminance signal in reduced form,

[0031]FIG. 1b shows an advantageous quantization matrix of chrominance signal in reduced form,

[0032]FIG. 1c shows an advantageous Huffman coding table for a DC coefficient of luminance signal in reduced form,

[0033]FIG. 1d shows an advantageous Huffman coding table for a DC coefficient of chrominance signal in reduced form,

[0034]FIG. 1e shows a part of an advantageous Huffman coding table for AC coefficients of luminance signal in reduced form,

[0035]FIG. 1f shows a part of an advantageous Huffman coding table for AC coefficients of chrominance signal in reduced form,

[0036]FIG. 1g shows an advantageous manner of arranging elements of image matrix in succession,

[0037]FIG. 2a shows an image coding device according to an advantageous embodiment of the invention in reduced block diagram,

[0038]FIG. 2b shows an image decoding device according to an advantageous embodiment of the invention in reduced block diagram,

[0039]FIG. 3a shows a data frame according to prior art,

[0040]FIG. 3b shows the data frame of FIG. 3a compressed with the method of the invention, and

[0041]FIG. 4 shows a mobile station according to an advantageous embodiment of the invention in reduced block diagram.

[0042]FIG. 2a illustrates a coding device 1 according to an advantageous embodiment of the invention. Image information in digital form that is coded is directed to an input IN of the coding device 1. The image information is preferably divided into blocks in a manner that at a time a given part of the image area is coded, e.g. in JPEG coding, a block of 8×8 pixels. To the pixels of this block, a discrete cosine transform is carried out in a DCT converter 2. In black and white pictures the image information is the luminance signal illustrating the brightness level of the pixels, wherein the DCT converter 2 comprises one discrete cosine converter. In color-image coding the DCT converter 2 comprises advantageously one discrete cosine converter for the luminance signal and two discrete cosine converters for the chrominance signal. However, these different converters are not illustrated in figures as such, nor are the other blocks of the coder that are discussed later, these having separate means for luminance and chrominance signals. The DCT converter 2 forms a 8×8 coefficient matrix FL, FC of each 8×8 image block that is converted, wherein a first element FL(0,0), FC(0,0) of the first horizontal line illustrates the average DC level of the pixels in the block. Horizontally, the remaining elements FL(1,0) . . . FL(7,0) illustrate the horizontal frequencies of the block, i.e., the variations in the details of respective image blocks in horizontal direction, and vertically the elements FL(0,1) . . . FL(0,7) of the coefficient matrix illustrate the vertical frequencies of the block. E.g. dense striping is in discrete cosine transform seen as larger frequencies.

[0043] From the DCT converter 2 the results of the conversion are directed to a quantization means 3. By the quantization means 3 a sort of stressed scaling is performed for different frequencies. In the quantization, quantization matrices QL, QC are used, whose dimensions correspond to the dimensions of the coefficient matrices FL, FC obtained from discrete cosine transform. FIG. 1a shows a quantization matrix QL of the luminance signal, and FIG. 1b shows a quantization matrix QC of the chrominance signal. The quantization means 3 carries out a division for coefficient matrices FL, FC formed by the DCT converters by using advantageously the formula (2a) illustrated earlier in the present specification. E.g. for the elements of a coefficient matrix FL of the luminance signal, a calculation is carried out by using the formula (2a) in a manner that the matrix AC used in the formula is the coefficient matrix FL of the luminance signal and the quantization matrix used is a quantization matrix QL of the luminance signal. In a corresponding manner, in connection with color images, the quantization of the FC elements in the coefficient matrix of the chrominance signal components is performed according to the formula (2a) in a matter that in the formula the coefficient matrix FC of the chrominance signal is used as the matrix AC and the quantization matrix QC of the chrominance signal is used as the quantization matrix.

[0044] Subsequent to the quantization, the quantized signal is directed to a coder 4, where the elements of the quantized signal are coded advantageously in the order illustrated in FIG. 1g. The coding is carried out preferably by a code of a varying length, such as the Huffman code. In coding, advantageously coefficient tables are used, of which a generally used coding table HL1 for the DC coefficient of the luminance signal is illustrated in the accompanying FIG. 1c. FIG. 1d shows in a corresponding manner a coding table HK1 for the DC coefficient of the chrominance signal. FIG. 1e illustrates further, in an exemplifying manner, a part of a coding table HL2 for AC coefficients of the luminance signal, i.e., the elements (0,1) 7,7), and FIG. 1g of a coding table HK2 for the AC coefficients of the chrominance signals.

[0045] In the tables of FIGS. 1c and 1 d, the left column illustrates a category by which the values that are coded are divided into size ranges. The values between 0 and 255 can be divided e.g. into 12 substantially equal portions, wherein category 0 comprises advantageously values 0 to 20, category 1 values 21 to 41, etc. In the coding phase, it is first examined to which category the value that is coded belongs to and on the basis of this a corresponding code word is selected from the third column of the table. In the second column of the table, information of the length of the code is shown for each category. After the code word, the index of the value that is coded in this category is annexed. In values classified according to the afore-mentioned example the index can be illustrated by using five bits. The categories can be divided also in stressed form, e.g. a part of the value areas are divided into smaller areas than the remaining value areas. The value that is coded is typically a difference of DC coefficients of two successive blocks, but the value can also be the absolute DC coefficient of each block.

[0046] With AC coefficients of matrices formed of the luminance signal, typically a coding table according to FIG. 1e is used. The left hand figures of the markings in the left hand column of the table illustrate the quantity of successive zero-valued terms in the matrix before the following term that deviates from zero, and the right hand figure separated by a slash illustrates the quantity of meaningful bits in the next term. The second column of the table illustrates the length of the code word in bits, and the third column of the table shows the code words. The code word in the first line of the table is used when all the remaining terms of the matrix are zero.

[0047] Subsequent to the coding, the signal is further directed to a conversion means 5, which on the basis of the coded signal forms in the invention a data frame 300 comprising a header field 301 and a data field 302. After the image information, there is still an end field 309, which informs of the ending of the data frame. One compressed data frame 300 formed according to the method of the invention is shown in the appended FIG. 3b. The information comprised in the header field 301 is more concise compared to the prior art header field of the data frame. The header field 301 comprises only the information necessary for the recognition of the data frame in the image decoding phase. The data field 302 of the data frame comprises the compressed image data. For this part the data frame 300 corresponds to a prior art data frame.

[0048] Next, the data frame 300 can e.g. be stored into storage devices 6, or the data frame can be transferred by a data transfer channel 7, such as a telecommunication network to be received and decoded.

[0049] In the following, decoding of image data is described in a decoding device 8 in accordance with FIG. 2b. The decoding device 8 is formed e.g. in connection with a mobile station 13. The decoding device 8 comprises a decoder 9 wherein the type of the data frame is examined. In case the type corresponds to the type of the data frame compressed in accordance with the invention, the decoder 9 uses decoding tables stored into the decoder 9 when decoding the code words formed in accordance with the compressed image in the data frame, these decoding tables having the same contents as the coding tables used in the coding of the coder 4. From the decoder 9, the decoded data is directed to a dequantizer 10, where the data is dequantized advantageously according to a formula (2b). Subsequent to the dequantization, the data corresponds to the compressed image data, which is still to be decompressed in order to form an image corresponding to the original image. To perform this, the data is directed from the dequantizer 10 to a decompression means 11, which can be a decompression means known as such. In connection with the present invention prior art compression methods, such as the JPEG can be used, which is earlier described in this specification.

[0050] From the decompression means 11, the image data can be directed e.g. to a display means 12 in order to show the image to the user.

[0051] The method of the invention can be employed also for image transmission in a mobile communication network by using short messages (SMS, Short Message Service) known as such. In the GSM standard 03.40 (Reference 4) these short messages are described, as well as connecting them in order to transmit a larger amount of information (C-SMS, Concatenated Short Messages).

[0052] The invention can be adapted e.g. for joining pictures of persons into telephone books e.g. in a mobile station 13, having a display means 12 for showing graphic images. One mobile station 13 of this type is shown in a reduced block diagram in the accompanying FIG. 4. Images of persons can be stored in compressed form in accordance with the method of the invention into storage means 14, wherein when using advantageously a telephone book embodiment implemented in the application software of the mobile station 13, it is possible to show in the device means 12, in addition to the telephone number, also e.g. a picture of the person, the logo of a company, pictures of products manufactured/marketed by a company etc. The storage means 14 comprise preferably read/write memory (RAM, Random Access Memory; NVRAM, Non-Volatile RAM; FLASH), and program memory (ROM, Read Only Memory), which is known as such.

[0053] With the mobile station 13 it is possible to receive via mobile communication network (not shown) transferred, in accordance with the method of the invention compressed images. In the transfer of images, e.g. short messages (SMS, C-SMS) can be used, wherein a radio part 15 of the mobile station receives the short messages. In the application software of a control unit 16 of the mobile station, these short messages are discharged from the data frames 300 of the invention, for which decoding, dequantization and inverse discrete cosine transform is performed in the decoding means 8 implemented in a mobile station, which is described earlier in the present specification.

[0054] If needed, it is possible to form in the mobile station 13 also coding means 1, wherein images compressed in accordance with the invention can also be sent from the mobile station 13.

[0055] The invention can be adapted also in existing systems, e.g. in a manner that the JPEG coded or the like data frame is directed to conversion means 5, where the header field is modified e.g. by removing the tables and changing the type data. In a corresponding manner, in the decoding phase of the data the invention allows the converted data frame to be formed into a prior art data frame by changing the header field e.g. to correspond to that shown in FIG. 3a.

[0056] The invention can be adapted also in a manner that the coder and decoder comprises stored several coding tables or quantization tables or both. In this case, in the coding phase a coding table and a quantization table are selected e.g. on the basis of the image that is coded at the time. The tables are preferably indexed, wherein to the header field is added the index of the table used in coding and the index of the table used in quantization. The decoder examines these indices from the header field and on the basis of them selects the tables used in the decoding and dequantization. For other respects the invention operates substantially in a manner corresponding to what is described in connection with the first advantageous embodiment of the invention.

[0057] The data frame described in the present specification is only one example of a data frame, wherein the invention can be adapted, but the invention is not restricted to only this or corresponding JPEG type images and Huffman coding. It is advantageous to employ the present invention in images where variable length coding (VLC) or arithmetic coding has been used in image coding, or wherein the coding table or a part thereof is comprised in the data frame.

[0058] The image in digital form to which the invention can be adapted can also be e.g. an image formed in a computer by a drawing program. 

1. A method in image processing, in which method an image in digital form is in coding phase compressed, quantized by a quantization matrix (QL, QC) and coded by a coding matrix (HL1, HK1, HL2), wherein one or more data frame is formed, and in decoding phase decoding, dequantization and decompression is carried out to the information comprised in the data frame, characterized in that one or more matrices (QL, QC, HL1, HK1, HL2) used in the coding phase are left out of the data frame, wherein the corresponding matrix is stored into a coding device (8) performing the decoding phase.
 2. The method according to claim 1, characterized in that the compression is carried out with discrete cosine transform (DCT).
 3. The method according to claim 1 or 2, characterized in that the coding is carried out with variable length coding, such as Huffman coding.
 4. The method according to any of claims 1 to 3, characterized in that the compression is carried out in accordance with the JPEG standard compression.
 5. A device, preferably a mobile station (13), comprising means (8) for processing an image in digital form and means (12) for showing the image to the user, which image in digital form has in the coding phase been compressed, quantized by a quantization matrix (QL, QC) and coded by a coding matrix (HL1, HK1, HL2) to form one or more data frames (300), and which image treating means (8) comprise means (9, 10, 11) for decoding, dequantization and decompression of the information comprised in the data frame (300), characterized in that the image processing means (8) further comprise means (14) with which the matrix (QL, QC, HL1, HK1, HL2) used in the coding phase and left out of the data frame is stored and used in the decoding of image.
 6. The device (13) according to claim 5, characterized in that the image processing means (8) comprise an inverse discrete cosine transformer (11).
 7. The device (13) according to claim 5 or 6, characterized in that it further comprises image coding means (1), comprising means (2) for image compression, means (3) for quantization the image by a quantization matrix (QL, QC), means (4) for coding the image by coding matrix (HL1, HK1, HL2) and means (5) for forming the data frame (300), wherein the data frame (300) is arranged to be formed without one or more matrices (QL, QC, HL1, HK1, HL2).
 8. The device (13) according to any of claims 5 to 7, characterized in that the mobile station comprises means (6) for storing the data frame (300). 